<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>状态页</title>
    <link rel="stylesheet" href="../css/reset.css">
    <link rel="stylesheet" href="../css/public.css">
    <link rel="stylesheet" href="../css/status.css">
</head>

<body>
    <!-- 头部 -->
    <div id="header">
        <div class="header_banxin">
            <div class="header_banxin_left">
                <a href="../index.html"><img src="../images/logo.png" alt=""></a>
            </div>
            <div class="header_banxin_right">
                <a href="#">登录</a>
                <a href="#">注册</a>
            </div>
        </div>
    </div>
    <div id="status">
        <h1>状态页</h1>
        <h2 id="h2"></h2>
        <p id="p">3秒后回到首页</p>
    </div>
    <script>
        h2.innerHTML = sessionStorage.state;

        setInterval(() => {
            var s = parseInt(p.innerHTML);
            s--;
            if (s == 0) {
                location = "../index.html";
            }
            p.innerHTML = s + "秒后回到首页";
        }, 1000)
    </script>
</body>

</html>